package net.zoneland.knowledge.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import net.zoneland.knowledge.constant.Constants;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 领航宣讲实体类
 * @author 王志伟
 * @date 2023/6/9 10：19
 */
public class PilotPreach {

    private String id;

    /**
     * 内容标题.
     */
    private String title;

    /**
     * 直播内容.
     */
    private String liveContent;


    /**
     *视频链接地址.
     */
    private String videoLinkAddress;

    /**
     * 内容日期.
     */
    @JsonFormat(pattern = Constants.DATE_FORMAT_DEFAULT, timezone = "GMT+8")
    @DateTimeFormat(pattern = Constants.DATE_FORMAT_DEFAULT)
    @JsonDeserialize(using = LocalDateDeserializer.class)		// 反序列化
    @JsonSerialize(using = LocalDateSerializer.class)		// 序列化
    private LocalDate dateTime;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getLiveContent() {
        return liveContent;
    }

    public void setLiveContent(String liveContent) {
        this.liveContent = liveContent;
    }

    public String getVideoLinkAddress() {
        return videoLinkAddress;
    }

    public void setVideoLinkAddress(String videoLinkAddress) {
        this.videoLinkAddress = videoLinkAddress;
    }

    public LocalDate getDateTime() {
        return dateTime;
    }

    public void setDateTime(LocalDate dateTime) {
        this.dateTime = dateTime;
    }
}
